package com.yanghui.agent.agent.springboot.b.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

@RestController
@RequestMapping("/integral")
@Slf4j
public class IntegralController {


    @RequestMapping("/query")
    public Map<String,Object> query(Long userId){
        log.info("userId={}",userId);
        Map<String,Object> result = new HashMap<>();
        result.put("num",new Random().nextInt(10000));
        result.put("userId",userId);
        return result;
    }
}
